<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class DispatchOrder extends BaseModel
{
    use HasFactory;
    //派单顺序列表
    protected $table = 'dispatch_order';
    // 允许批量操作的字段
    protected $fillable = ['name','sort','is_del','created_at','updated_at'];

    public function scopeSearch($query,$params)
    {
        $query->where('is_del',$params['is_del']??2);
        return $query;
    }
}
